﻿<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<SDT.Site.ViewModels.DemandListModels>" %>
<%@ Import Namespace="SDT.Lib.Helpers" %>
<%if(Model.Demands.Count>0){ %>
<div class="otheritem">
    <div class="title">
        <div class="o111">
            <%=Model.Demands[0].DemandCategory != null ? Html.Encode(Model.Demands[0].DemandCategory.Name.Trim()) : string.Empty%>
            <%=Model.Demands[0].City != null ? "tại&nbsp;" + Html.Encode(Model.Demands[0].City.Name) : string.Empty%>
        </div>
        <div class="line"></div>
    </div>
    <div class="o2">
        <ul>
            <%foreach (var item in Model.Demands)
              { %>
            <li><a href="/demand/details/<%=item.ID %>/<%=Html.ToUrlFriendly(item.Title)%>"><%=Html.Encode(item.Title) %></a>(<%=item.AddDate.Value.ToString("dd/MM/yyyy") %>)</li>
            <%} %>
        </ul>
    </div>
</div>
<%} %>